package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GwRouterMapper;
import com.ruoyi.system.domain.GwRouter;
import com.ruoyi.system.service.IGwRouterService;

/**
 * 路由Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class GwRouterServiceImpl implements IGwRouterService 
{
    @Autowired
    private GwRouterMapper gwRouterMapper;

    /**
     * 查询路由
     * 
     * @param id 路由主键
     * @return 路由
     */
    @Override
    public GwRouter selectGwRouterById(Long id)
    {
        return gwRouterMapper.selectGwRouterById(id);
    }

    @Override
    public GwRouter selectGwRouterByNodeIdentifierAndPrefix(String nodeIdentifier, String prefix) {
        return gwRouterMapper.selectGwRouterByNodeIdentifierAndPrefix(nodeIdentifier,prefix);
    }

    /**
     * 查询路由列表
     * 
     * @param gwRouter 路由
     * @return 路由
     */
    @Override
    public List<GwRouter> selectGwRouterList(GwRouter gwRouter)
    {
        return gwRouterMapper.selectGwRouterList(gwRouter);
    }

    /**
     * 新增路由
     * 
     * @param gwRouter 路由
     * @return 结果
     */
    @Override
    public int insertGwRouter(GwRouter gwRouter)
    {

        return gwRouterMapper.insertGwRouter(gwRouter);
    }

    /**
     * 修改路由
     * 
     * @param gwRouter 路由
     * @return 结果
     */
    @Override
    public int updateGwRouter(GwRouter gwRouter)
    {

        return gwRouterMapper.updateGwRouter(gwRouter);
    }

    /**
     * 批量删除路由
     * 
     * @param ids 需要删除的路由主键
     * @return 结果
     */
    @Override
    public int deleteGwRouterByIds(Long[] ids)
    {
        return gwRouterMapper.deleteGwRouterByIds(ids);
    }

    /**
     * 删除路由信息
     * 
     * @param id 路由主键
     * @return 结果
     */
    @Override
    public int deleteGwRouterById(Long id)
    {
        return gwRouterMapper.deleteGwRouterById(id);
    }
}
